-- cmd_take_dungeon_pass_bonus
-- Created by zouyb
-- 领取区域通关奖励

function Operation.cmd_take_dungeon_pass_bonus(areaId)
    -- 客户端自行领取
    local ret, bonusList = DungeonAreaM.takeBonus(ME.user, areaId);

    if not ret then
        return false;
    else
        if bonusList ~= nil and #bonusList > 0 then
            showBonusNotifyForm(getLocStr("sub_area_bonus_tip"), bonusList);
        end
    end

    -- 记录起来，需要进行同步
    local v = { ["area"] = areaId, };

    SyncM.addMessage("CMD_TAKE_DUNGEON_PASS_BONUS", v);
    SyncM.startSync();
end